Scenario #4306: Settle Members Debt with Coop Assets Via Clearing

Properties

Required

Given

name value
memberNumber M-3101000
reference cancel 2024-01-15
valueToClear 128
comment clearing according to members debt
transactionDate 2024-02-15

Find membershipUuid

HTTP GET "/api/hs/office/memberships/M-3101000" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
{
  "uuid" : "ef1b1ad5-3f35-4171-8714-fdaaed78109b", // Membership: M-3101000 - Test AG
  "partner" : {
    "uuid" : "4db6b8bf-d1f9-4a92-953c-787e345acb22", // Partner: P-31010 - Test AG
    "partnerNumber" : "P-31010",
    "partnerRel" : {
      "uuid" : "da7c6690-455b-404c-aac3-fa98660e5a7d", // partnerRelationUuid
      "anchor" : {
        "uuid" : "8f6b2e83-5cd0-4f3b-bac9-c56b374445cf", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "3029ef4b-ab91-429d-855b-26a8bedcef6e", // Person: Test AG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Test AG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "ab067924-4231-4dce-a465-f768d7d54c2a", // Contact: Test AG - China
        "caption" : "Test AG - China",
        "postalAddress" : {
          "country" : "China",
          "province" : "Guangdong Province",
          "city" : "Dongguan City",
          "street" : "No.2 Commercial Second Street",
          "district" : "Niushan Wei Wu",
          "department" : "Executive Board",
          "building" : "Thi Chi Koh Building"
        },
        "emailAddresses" : {
          "main" : "norden@test-ag.example.org"
        },
        "phoneNumbers" : {
          "phone" : "++15 999 654321"
        }
      }
    },
    "details" : {
      "uuid" : "bbb58ff5-d4bf-4d7f-b6a4-e40af4f0142f",
      "registrationOffice" : "Registergericht Hamburg",
      "registrationNumber" : "1234567",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "mainDebitor" : null,
  "memberNumber" : "M-3101000",
  "memberNumberSuffix" : "00",
  "validFrom" : "2020-10-15",
  "validTo" : "2023-12-31",
  "status" : "CANCELLED",
  "membershipFeeBillable" : true
}

Create the Coop-Assets-CLEARING Transaction

HTTP POST "/api/hs/office/coopassetstransactions" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "membership.uuid" : "ef1b1ad5-3f35-4171-8714-fdaaed78109b", // Membership: M-3101000 - Test AG
  "transactionType" : "CLEARING",
  "reference" : "cancel 2024-01-15",
  "assetValue" : "-128",
  "comment" : "clearing according to members debt",
  "valueDate" : "2024-02-15"
}
EOF
=> status: 201 CREATED 5423a424-b914-4687-bbd6-af5d44234b74

Verify Coop-Assets CLEARING-Transaction

HTTP GET "/api/hs/office/coopassetstransactions/5423a424-b914-4687-bbd6-af5d44234b74" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
{
  "uuid" : "5423a424-b914-4687-bbd6-af5d44234b74",
  "membership.uuid" : "ef1b1ad5-3f35-4171-8714-fdaaed78109b", // Membership: M-3101000 - Test AG
  "membership.memberNumber" : "M-3101000",
  "transactionType" : "CLEARING",
  "assetValue" : -128,
  "valueDate" : "2024-02-15",
  "reference" : "cancel 2024-01-15",
  "comment" : "clearing according to members debt",
  "adoptionAssetTx" : null,
  "transferAssetTx" : null,
  "revertedAssetTx" : null,
  "reversalAssetTx" : null
}

generated on 2026-08-10 03:08:32 for branch HEAD